// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIXULRuntime.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// Provides information about the XUL runtime.
    /// @status UNSTABLE - This interface is not frozen and will probably change in
    /// future releases. If you need this functionality to be
    /// stable/frozen, please contact Benjamin Smedberg.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("a1b2e167-b748-42bf-ba85-996ec39062b9")]
	public interface nsIXULRuntime
	{
		
		/// <summary>
        /// Whether the application was launched in safe mode.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetInSafeModeAttribute();
		
		/// <summary>
        /// Whether to write console errors to a log file. If a component
        /// encounters startup errors that might prevent the app from showing
        /// proper UI, it should set this flag to "true".
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetLogConsoleErrorsAttribute();
		
		/// <summary>
        /// Whether to write console errors to a log file. If a component
        /// encounters startup errors that might prevent the app from showing
        /// proper UI, it should set this flag to "true".
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetLogConsoleErrorsAttribute([MarshalAs(UnmanagedType.U1)] bool aLogConsoleErrors);
		
		/// <summary>
        /// A string tag identifying the current operating system. This is taken
        /// from the OS_TARGET configure variable. It will always be available.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetOSAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aOS);
		
		/// <summary>
        /// A string tag identifying the binary ABI of the current processor and
        /// compiler vtable. This is taken from the TARGET_XPCOM_ABI configure
        /// variable. It may not be available on all platforms, especially
        /// unusual processor or compiler combinations.
        ///
        /// The result takes the form <processor>-<compilerABI>, for example:
        /// x86-msvc
        /// ppc-gcc3
        ///
        /// This value should almost always be used in combination with "OS".
        ///
        /// @throw NS_ERROR_NOT_AVAILABLE if not available.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetXPCOMABIAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aXPCOMABI);
		
		/// <summary>
        /// A string tag identifying the target widget toolkit in use.
        /// This is taken from the MOZ_WIDGET_TOOLKIT configure variable.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetWidgetToolkitAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aWidgetToolkit);
		
		/// <summary>
        /// The type of the caller's process.  Returns one of the values above.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		uint GetProcessTypeAttribute();
		
		/// <summary>
        /// The system process ID of the caller's process.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		uint GetProcessIDAttribute();
		
		/// <summary>
        /// If true, browser tabs may be opened by default in a different process
        /// from the main browser UI.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetBrowserTabsRemoteAutostartAttribute();
		
		/// <summary>
        /// If true, the accessibility service is running.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetAccessibilityEnabledAttribute();
		
		/// <summary>
        /// Indicates whether the current Firefox build is 64-bit.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIs64BitAttribute();
		
		/// <summary>
        /// Signal the apprunner to invalidate caches on the next restart.
        /// This will cause components to be autoregistered and all
        /// fastload data to be re-created.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void InvalidateCachesOnRestart();
		
		/// <summary>
        /// Starts a child process. This method is intented to pre-start a
        /// content child process so that when it is actually needed, it is
        /// ready to go.
        ///
        /// @throw NS_ERROR_NOT_AVAILABLE if not available.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void EnsureContentProcess();
		
		/// <summary>
        /// Modification time of the profile lock before the profile was locked on
        /// this startup. Used to know the last time the profile was used and not
        /// closed cleanly. This is set to 0 if there was no existing profile lock.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		long GetReplacedLockTimeAttribute();
		
		/// <summary>
        /// Local ID of the minidump generated when the process crashed
        /// on the previous run. Can be passed directly to CrashSubmit.submit.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetLastRunCrashIDAttribute([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase aLastRunCrashID);
		
		/// <summary>
        /// True if this is a RELEASE_BUILD.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsReleaseBuildAttribute();
		
		/// <summary>
        /// True if this build uses official branding (MOZ_OFFICIAL_BRANDING).
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsOfficialBrandingAttribute();
		
		/// <summary>
        /// The default update channel (MOZ_UPDATE_CHANNEL).
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetDefaultUpdateChannelAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aDefaultUpdateChannel);
		
		/// <summary>
        /// The distribution ID for this build (MOZ_DISTRIBUTION_ID).
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetDistributionIDAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aDistributionID);
		
		/// <summary>
        /// True if this is an official build (MOZILLA_OFFICIAL).
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsOfficialAttribute();
	}
	
	/// <summary>nsIXULRuntimeConsts </summary>
	public class nsIXULRuntimeConsts
	{
		
		// <summary>
        // The legal values of processType.
        // </summary>
		public const ulong PROCESS_TYPE_DEFAULT = 0;
		
		// 
		public const ulong PROCESS_TYPE_PLUGIN = 1;
		
		// 
		public const ulong PROCESS_TYPE_CONTENT = 2;
		
		// 
		public const ulong PROCESS_TYPE_IPDLUNITTEST = 3;
		
		// 
		public const ulong PROCESS_TYPE_GMPLUGIN = 4;
	}
}
